import React, { useState } from 'react';
import SideMenu from 'components/common/SideMenu/index';
import AddPile from './AddPile';
import FuncSetting from './FuncSetting';
import './index.less'
const ADD_PILE = 'addPile'
const FUNC_SETTING = 'funcSetting'
const PileMenu = [{
    menuName: '添加路桩',
    menuKey: ADD_PILE
}, {
    menuName: '功能设置',
    menuKey: FUNC_SETTING
}]
/** 路桩配置 */
const PileConfig = () => {
    const [activeMenu, setActiveMenu] = useState(ADD_PILE)
    return (
        <div className="pile-config">
            <div style={{ width: 200 }}>
                <SideMenu activeMenu={activeMenu} menus={PileMenu} setActiveMenu={setActiveMenu}></SideMenu>
            </div>
            { activeMenu === ADD_PILE && <AddPile></AddPile>}
            { activeMenu === FUNC_SETTING && <FuncSetting></FuncSetting>}
        </div>
    )
}
export default PileConfig